package net.flyinggroup.observability;

import io.micrometer.core.instrument.Tags;
import io.micrometer.core.instrument.config.MeterFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.time.ZoneId;
import java.util.UUID;

@Configuration(proxyBeanMethods = false)
public class MetricsFilterConfig {
    @Bean
    public MeterFilter commonTagsMeterFilter() {
        return MeterFilter.commonTags(
                Tags.of(
                        "instance.uuid", UUID.randomUUID().toString(),
                        "zone.id", ZoneId.of("Europe/Berlin").toString()
                )
        );
    }
}
